package Conexion;

import java.sql.DriverManager;
import java.sql.SQLException;

import com.mysql.jdbc.Connection;

public class ConexionMySql {

	public Connection getConnection () throws Exception{
		Connection conexion = null;
		try{
			String driver = "com.mysql.jdbc.Driver";
			String url = "jdbc:mysql://localhost/bancomobbba";
			String usserName = "root";
			String password = "root";
			Class.forName(driver);
			conexion = (Connection) DriverManager.getConnection( 
					url, usserName, password);
		}
		catch(SQLException e){
			
		}catch (Exception e) {
			// TODO: handle exception
		}
		return conexion;
	}
}
